package com.outsider.view;

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;

public class VerticalScrollView extends ScrollView {
	private OnScrollViewScrollListener onScrollViewScrollListener;
	

	public VerticalScrollView(Context context) {
		super(context);
	}

	public VerticalScrollView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public VerticalScrollView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public OnScrollViewScrollListener getOnScrollViewScrollListener() {
		return onScrollViewScrollListener;
	}
	
	
	
	public void setOnScrollViewScrollListener(OnScrollViewScrollListener onScrollViewScrollListener) {
		this.onScrollViewScrollListener = onScrollViewScrollListener;
	}

	@Override
	protected void onScrollChanged(int l, int t, int oldl, int oldt) {
		super.onScrollChanged(l, t, oldl, oldt);
		
	}

	@SuppressLint("ClickableViewAccessibility")
	@Override
	public boolean onTouchEvent(MotionEvent ev) {
		// TODO Auto-generated method stub
		if(this.onScrollViewScrollListener != null){
			this.onScrollViewScrollListener.onScrollChanged(ev);
		}
		return super.onTouchEvent(ev);
	}





	

}
